﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel.Activation;
using System.ServiceModel;

namespace Ashlen.Portal.Services
{
    class CustomHostFactory : System.ServiceModel.Activation.WebScriptServiceHostFactory
    {
        protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) {
            CustomHost customServiceHost =
              new CustomHost(serviceType, baseAddresses[1]);
            return customServiceHost;
        }
    }

    class CustomHost : System.ServiceModel.ServiceHost
    {
        public CustomHost(Type serviceType, params Uri[] baseAddresses)
            : base(serviceType, baseAddresses) { }
        protected override void ApplyConfiguration() {
            base.ApplyConfiguration();
        }
    }
}
